<template>
  <div ref="chartRef"></div>
</template>

<script>
import { chartRender } from "../model";
export default {
  name: "chartLineSW",
  props: {
    data: {
      type: Object,
      default: () => {},
    },
  },
  components: {},
  data() {
    return {};
  },
  computed: {},
  mounted() {},
  methods: {},
  watch: {
    data: {
      deep: true,
      immediate: true,
      handler(newVal) {
        this.$nextTick(() => {
          newVal && chartRender({ id: this.$refs.chartRef, data: newVal });
        });
      },
    },
  },
};
</script>
<style lang="scss" scoped>
//@import url(); 引入公共css类
@import "../index.scss";
</style>
